-- GENERATED SPELL FOR [Morloch] --


function spell0_11657(pUnit, Event) --@Curse of Weakness,Self--
pUnit:FullCastSpellOnTarget(12741,pUnit)
pUnit:RegisterEvent('Sorts_11657', 563, 1)
end

function spell1_11657(pUnit, Event) --@Shadow Bolt,n/a--
pUnit:FullCastSpellOnTarget(15537,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_11657', 3000, 1)
end

function spell2_11657(pUnit, Event) --@Shadow Bolt Volley,n/a--
pUnit:FullCastSpellOnTarget(17228,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_11657', 679, 1)
end

function spell3_11657(pUnit, Event) --@Summon Imp,Self--
pUnit:FullCastSpellOnTarget(11939,pUnit)
pUnit:RegisterEvent('Sorts_11657', 612, 1)
end

function Sorts_11657(pUnit, Event)
local choix_sorts_11657 = math.random(0, 3)
if choix_sorts_11657 == 0 then
pUnit:RegisterEvent('spell0_11657', 1, 1)
end
if choix_sorts_11657 == 1 then
pUnit:RegisterEvent('spell1_11657', 1, 1)
end
if choix_sorts_11657 == 2 then
pUnit:RegisterEvent('spell2_11657', 1, 1)
end
if choix_sorts_11657 == 3 then
pUnit:RegisterEvent('spell3_11657', 1, 1)
end
end

function mob11657_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_11657', math.random(1500, 3000), 1)
end

function mob11657_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob11657_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob11657_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(11657, 1, 'mob11657_Action')
RegisterUnitEvent(11657, 2, 'mob11657_Leave')
RegisterUnitEvent(11657, 3, 'mob11657_Kill')
RegisterUnitEvent(11657, 4, 'mob11657_Die')
